home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
source
/
hobbspr2
/
etc.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-24
|
1KB
|
33 lines
// Mode X Sprite Library
// Copyright (C) 1992 Court Demas -- court+@cmu.edu
#include "etc.h"
// Update the position of the object based on it's speed and direction.
// Supports up to 8 directions at this point.
// Obviously does NOT take into account the fact that you go faster when
// heading on a diagonal. (you should do a Move*(speed*sqrt(2)/2) or
// speed*cos(45) in each direction).
void TPVector::Update_Position(void) {
MoveRight(GetDeltaX());
MoveDown(GetDeltaY());
/*
switch (GetDirection()) {
case UP : MoveUp(Speed); break;
case UPRIGHT : MoveUp(Speed); MoveRight(Speed); break;
case RIGHT : MoveRight(Speed); break;
case DOWNRIGHT : MoveRight(Speed); MoveDown(Speed); break;
case DOWN : MoveDown(Speed); break;
case DOWNLEFT : MoveDown(Speed); MoveLeft(Speed); break;
case LEFT : MoveLeft(Speed); break;
case UPLEFT : MoveLeft(Speed); MoveUp(Speed); break;
}
*/
}
//*****************************************************************************
// End of etc.cpp